import API_PREFIX from './config'

export default [
  {
    // 用户登录
    url: `${API_PREFIX}/user/login`,
    method: 'post',
    response: (req) => {
      const DataCun = {
        address: null,
        email: null,
        id: 1,
        idCard: '372923199611124417',
        ishz: '1',
        name: '黄德生',
        orgCode: '371622001200',
        orgName: '西北村',
        phone: '17806096877',
        sex: null,
      }
      const DataZhen = {
        address: null,
        email: null,
        id: 1,
        idCard: '372923199611124417',
        ishz: '1',
        name: '镇用户',
        orgCode: '371622001',
        orgName: '信城',
        phone: '17806096877',
        sex: null,
      }
      const DataXian = {
        address: null,
        email: null,
        id: 1,
        idCard: '372923199611124417',
        ishz: '1',
        name: '县用户',
        orgCode: '371622',
        orgName: '阳信县',
        phone: '17806096877',
        sex: null,
      }

      let d = null
      if (req.body.state == 'cun') {
        d = DataCun
      }
      if (req.body.state == 'zhen') {
        d = DataZhen
      }
      if (req.body.state == 'xian') {
        d = DataXian
      }
      return {
        dict: null,
        errcode: 0,
        errmsg: '操作成功',
        otherData: null,
        result: d,
        sessionid: null,
        sysErrMsg: null,
      }
    },
  },
]
